import Vue from 'vue'
import home from "./../components/home.vue";
import about from "./../components/about.vue";
import foo from "./../components/Foo.vue";
import Router  from 'vue-router'
Vue.use(Router)

const Default = { template: '<div class="default"><img src="../../assets/logo.png" style="width:50px;">default</div>' }
//const Foo = { template: '<div class="foo"><img src="../../assets/logo.png" style="width:60px;">foo</div>' }
const Bar = { template: '<div class="bar"><img src="../../assets/logo.png" style="width:70px;">bar</div>' }
export default new Router({
	mode:"hash",
  routes: [
  
    {
      path: "/about",
       component: about
    },
    {
      path: '/home',
      component: home,
      children: [
        { path: '/', component: Default },
        { path: '/foo', component: foo },
        { path: '/bar', component: Bar }
      ]
    },
  ]
})

